import java.util.Arrays;

public class day04 {

    public static void main(String[] args) {
        int[] arr = {11, 21, 5, 12, 7, 14};

       int[] show = show(arr);
        System.out.println(Arrays.toString(arr));

    }

    public static int[] show(int[] arr) {

        int temp = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] > arr[arr.length - 1 - i]) {
                temp = arr[i];
                arr[i] = arr[arr.length - 1 - i];
                arr[arr.length - 1 - i] = temp;
            }
        }

        return arr;
    }

}
